package com.apestech.framework.sql.modul;

import com.apestech.framework.json.JSONObject;

/**
 * @author hup
 * @create 2018-08-28-9:40
 */
public class FieldCondition {

    private String field;
    private String operator;
    private Object value;
    private String id;
    private String tree;
    private String parentid;
    private String type;

    public FieldCondition(String field, String operator, Object value, String type){
        this.field=field;
        this.operator=operator;
        this.value=value;
        this.type=type;
    }

    public FieldCondition(String field, JSONObject map){
        this.field=field;
        operator=map.getString("operator");
        value=map.get("value");
        id=map.getString("id");
        tree=map.getString("tree");
        parentid=map.getString("parentid");
        type=map.getString("type");
    }

    public String getField() {
        return field;
    }

    public String getOperator() {
        return operator;
    }

    public Object getValue() {
        return value;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTree() {
        return tree;
    }

    public void setTree(String tree) {
        this.tree = tree;
    }

    public String getParentid() {
        return parentid;
    }

    public void setParentid(String parentid) {
        this.parentid = parentid;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public void setValue(Object value) {
        this.value = value;
    }
}
